<?php /* Smarty version 2.6.26, created on 2010-11-30 17:27:43
         compiled from user_panel_company.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'cycle', 'user_panel_company.tpl', 45, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<div id="block_featured" class="block">
	<img src="images/theme/ribbon.png" class="ribbon"/>
	<span class="ribbon_text"><?php echo $this->_tpl_vars['title']; ?>
</span>
    <div class="block_inside">
	
	<?php echo $this->_tpl_vars['info_action']; ?>

	
	<div class="user_panel">
		<ul class="tabs">
			<li><a href="#tab1">Praktyki</a></li>
			<li><a href="#tab2">Praktykanci</a></li>
			<!--<li><a href="#tab3">Dane firmy</a></li>
			<li><a href="#tab4">Pracownicy</a></li>-->
		</ul>

		<div class="tab_container">
			<div id="tab1" class="tab_content">	
				<div class="table_div">
					<form method="post" id="show_practices">
						<a href="new_practice.php" class="button b_blue" style="color: white; text-decoration: none;">Dodaj nową praktykę</a><br/><br/>
						<table id="practices" class="tablesorter">
							<thead>
								<tr style="color:#789;font-weight: bold">
									<th></th>
									<th>Lp.</th>
									<th>Numer</th>
									<th>Data dodania</th>
									<th>Data rozpoczęcia</th>
									<th>Data zakończenia</th>
									<th>Liczba miejsc</th>
									<th>Status</th>
									<th>Akcje</th>
								</tr>
							</thead>
							<tbody>
								<?php if (! empty ( $this->_tpl_vars['practices'] )): ?>
									<?php $_from = $this->_tpl_vars['practices']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['practice'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['practice']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['practice']):
        $this->_foreach['practice']['iteration']++;
?>
									<?php if ($this->_tpl_vars['practice']['status'] == 1): ?>
									<tr style="background-color :#C1FFC1">
									<?php elseif ($this->_tpl_vars['practice']['status'] == -1): ?>
									<tr style="background-color :#FA8072">									
									<?php else: ?>
									<tr style="background-color:<?php echo smarty_function_cycle(array('values' => "#F6F6F6,white"), $this);?>
">
									<?php endif; ?>
										<td><input type="checkbox" name="cb[]" id="cb[]" value="<?php echo $this->_tpl_vars['practice']['id']; ?>
"/></td>
										<td><?php echo $this->_foreach['practice']['iteration']; ?>
</td>
										<td><?php echo $this->_tpl_vars['practice']['id']; ?>
</td>
										<td><?php echo $this->_tpl_vars['practice']['add_date']; ?>
</td>
										<td><?php echo $this->_tpl_vars['practice']['date_start']; ?>
</td>
										<td><?php echo $this->_tpl_vars['practice']['date_end']; ?>
</td>
										<?php if ($this->_tpl_vars['practice']['amount'] > 0): ?>
											<td><?php echo $this->_tpl_vars['practice']['amount']; ?>
</td>
										<?php else: ?>
											<td><img src="images/user--minus.png"/></td>
										<?php endif; ?>
										<td>
											<?php if ($this->_tpl_vars['practice']['status'] == 0): ?>
												<img src="images/flag-yellow.png"/>
											<?php elseif ($this->_tpl_vars['practice']['status'] == 1): ?> 	
												<img src="images/flag-green.png"/>
											<?php elseif ($this->_tpl_vars['practice']['status'] == 2): ?> 	
												<img src="images/flag-black.png"/>	
											<?php elseif ($this->_tpl_vars['practice']['status'] == -1): ?> 	
												<img src="images/flag--exclamation.png"/>
											<?php endif; ?>
										</td>
										<td>
											<a href ="practice_details.php?id=<?php echo $this->_tpl_vars['practice']['id']; ?>
" class="extLink" >
												<img src="images/magnifier-left.png"/>
											</a>	
											<a href ="user_panel.php?remove_id=<?php echo $this->_tpl_vars['practice']['id']; ?>
" >
												<img src="images/cross.png"/>
											</a>
											<a href ="user_panel.php?finish_id=<?php echo $this->_tpl_vars['practice']['id']; ?>
" >
												<img src="images/calendar--minus.png"/>
											</a>
										</td>
									</tr>
									<?php endforeach; endif; unset($_from); ?>
								<?php else: ?>
									<tr>
										<td colspan="7">Brak ofert praktyk.</td>
									</tr>			
								<?php endif; ?>
							</tbody>
						</table>
						<input type="button"  value="Zaznacz" onclick="jqCheckAll('show_practices', 'cb[]', 1);" class="button b_blue"/>
						<input type="button"  value="Odznacz" onclick="jqCheckAll('show_practices', 'cv[]', 0);" class="button b_blue"/>
						<input type="submit" name="delete" id="delete" value="Usuń" class="button b_red"/>
					</form>
					<div>

						<br/>
						<br/>
						<div class="legend">
							<img src="images/flag-yellow.png"/> - praktyka oczekuje na akceptację<br/>
							<img src="images/flag--exclamation.png"/> - praktyka odrzucona przez administratora<br/>
							<img src="images/flag-green.png"/> - praktyka zaakceptowana<br/>
							<img src="images/flag-black.png"/> - praktyka zakończona<br/>
						</div>
					</div>
				</div>			
			</div>
			<div id="tab2" class="tab_content">
				<div class="table_div">
					<form method="post" id="show_practices">
						<table id="practices" class="tablesorter">
							<thead>
								<tr style="color:#789;font-weight: bold">
									<th>Lp.</th>
									<th>Numer praktyki</th>
									<th>Imię</th>
									<th>Nazwisko</th>
									<th>Email</th>
									<th>Status</th>
									<th>Akcje</th>
								</tr>
							</thead>
							<tbody>
								<?php if (! empty ( $this->_tpl_vars['students'] )): ?>
									<?php $_from = $this->_tpl_vars['students']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['student'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['student']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['s']):
        $this->_foreach['student']['iteration']++;
?>
									<?php if ($this->_tpl_vars['s']['status'] == 1): ?>
									<tr style="background-color :#C1FFC1">
									<?php elseif ($this->_tpl_vars['s']['status'] == -1): ?>
									<tr style="background-color :#FA8072">									
									<?php else: ?>
									<tr style="background-color:<?php echo smarty_function_cycle(array('values' => "#F6F6F6,white"), $this);?>
">
									<?php endif; ?>
										<td><?php echo $this->_foreach['student']['iteration']; ?>
</td>
										<td><?php echo $this->_tpl_vars['s']['practice_id']; ?>
</td>
										<td><?php echo $this->_tpl_vars['s']['student_name']; ?>
</td>
										<td><?php echo $this->_tpl_vars['s']['student_surname']; ?>
</td>
										<td><?php echo $this->_tpl_vars['s']['email']; ?>
</td>
										<td>
											<?php if ($this->_tpl_vars['s']['status'] == 0): ?>
												<img src="images/flag-yellow.png"/>
											<?php elseif ($this->_tpl_vars['s']['status'] == 1): ?> 	
												<img src="images/flag-green.png"/>
											<?php elseif ($this->_tpl_vars['s']['status'] == 2): ?> 	
												<img src="images/flag-black.png"/>	
											<?php elseif ($this->_tpl_vars['s']['status'] == -1): ?> 	
												<img src="images/flag--exclamation.png"/>
											<?php endif; ?>
										</td>
										<td>
											<a href ="student_details.php?id=<?php echo $this->_tpl_vars['s']['id']; ?>
" class="extLink" >
												<img src="images/magnifier-left.png"/>
											</a>	
											<a href ="user_panel.php?remove_id=<?php echo $this->_tpl_vars['s']['id']; ?>
" >
												<img src="images/cross.png"/>
											</a>
											<a href ="user_panel.php?finish_id=<?php echo $this->_tpl_vars['s']['id']; ?>
" >
												<img src="images/calendar--minus.png"/>
											</a>
										</td>
									</tr>
									<?php endforeach; endif; unset($_from); ?>
								<?php else: ?>
									<tr>
										<td colspan="7">Aktualnie brak praktykantów.</td>
									</tr>			
								<?php endif; ?>
							</tbody>
						</table>
					</form>
				</div>				
			</div>
			<div id="tab3" class="tab_content">
			</div>
			<div id="tab4" class="tab_content">
			</div>
		</div>
	</div>
</div>
</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "footer.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>